<html>
<head>
    <meta charset="UTF-8">

    <link rel="stylesheet" href="/css/1625.5e74537e.chunk.css">
    <link rel="stylesheet" href="/css/1875.e7869e27.chunk.css">
    <link rel="stylesheet" href="/css/2828.b54ede6f.chunk.css">
    <link rel="stylesheet" href="/css/3409.87017755.chunk.css">
    <link rel="stylesheet" href="/css/4881.78d38e08.chunk.css">
    <link rel="stylesheet" href="/css/5892.148c7396.chunk.css">
    <link rel="stylesheet" href="/css/7182.78c3e594.chunk.css">
    <link rel="stylesheet" href="/css/9582.bc863a3d.chunk.css">


    <link rel="stylesheet" href="/css/layout__index.2d03cb4d.chunk.css">
    <link rel="stylesheet" href="/css/HeaderRight.c8616cce.chunk.css">
    <link rel="stylesheet" href="/css/p__NewInfoManage__index.d7c8a480.chunk.css">
    <link rel="stylesheet" href="/css/PageAlert.8c7e7f3e.chunk.css">
    <link rel="stylesheet" href="/css/umi.717090dc.css">


    <link rel="stylesheet" src="/publict__plugin-layout__Layout.49cdc665.chunk.css">

    <style type="text/css">
        .contentwrap {
            width: 98%;
            margin: 0 auto;
            padding: 10px;
        }

        ul {
            list-style: none;
            margin: 0;
            padding-left: 20px;
        }

        ul.tab {
            border-bottom: 1px solid #ccc;
            padding-bottom: 1px;
            height: 50px;
            line-height: 50px;
            color: #696969;
        }

        ul.tab li {
            float: left;
            font-family: "微软雅黑";
            cursor: pointer;
            padding: 0px;


        }

        ul.tab li.li {
            padding: 0px 25px 0px;
            font-size: 15px;
            height: 50px;
            line-height: 50px;
            background: #F4F5F9;
            border-top: 1px solid #C5D0DC;
            border-left: 1px solid #C5D0DC;
            border-bottom: 1px solid #C5D0DC;

        }

        ul.tab li.current {
            border-bottom: 0px;
            border-top: 2px solid #7599DE;
            font-size: 15px;
            color: #343434;
            background: #FFFFFF;

        }

        ul.tab li.li:last-child {
            border-right: 1px solid #C5D0DC;
        }

    </style>
</head>
<body>

<div>
    <div class="ant-card easy-ui-card in___AP3Me" style="margin: 20px">
        <div class="ant-card-body">
            <div class="line___D2gQF">
                <div class="ant-row" style="margin-left: -12px; margin-right: -12px; row-gap: 16px;">
                    <div class="ant-col ant-col-8" style="padding-left: 12px; padding-right: 12px;">
                        <span class="itemfirst___tV05S">姓名</span>
                        <span id="name" class="item___h4O2y">-</span>
                    </div>
                    <div class="ant-col ant-col-8" style="padding-left: 12px; padding-right: 12px;">
                        <span class="itemfirst___tV05S">身份证号码</span>
                        <span id="cardNum" class="item___h4O2y">-</span>
                    </div>
                    <div class="ant-col ant-col-8" style="padding-left: 12px; padding-right: 12px;">
                        <span class="itemfirst___tV05S">手机号码</span>
                        <span id="mobile" class="item___h4O2y">-</span>
                    </div>

                </div>
            </div>
        </div>
    </div>

    <div id="contentwrap" class="contentwrap">
        <ul class="tab" id="tab">
            <li id="li_user" class="li current"><span>用户身份信息</span></li>
            <li id="li_machine" class="li"><span>机审报告</span></li>
            <li id="li_order" class="li"><span>订单列表</span></li>
            <li id="li_tan_zhen_a" class="li"><span>探针C</span></li>
            <li id="li_leida" class="li"><span>全景雷达</span></li>
            <li id="li_device" class="li"><span>设备信息</span></li>
        </ul>
    </div>

    <div id="iframeContent">

    </div>

</div>

</body>
<script src="/url.js"></script>
<script src="/jquery-3.5.1.min.js"></script>
<script type="text/javascript">

    let userId
    initIframe()
    function initIframe() {
         userId = new URLSearchParams(location.href.split('?')[1]).get("ids")
        let iframeContent = '<iframe id = "iframe_content" width="100%" height="900px" src="/userBaseInfo.html?userId=' + userId + '" style="display:block"></iframe>';
        document.getElementById("iframeContent").innerHTML = iframeContent

        let url = requestUrl + "/erupt-api/user/detail";
        $.ajax({
            type: "POST",
            url: url,
            headers: {
                token: parent.getAppToken().token
            },
            data: {userId: userId},
            datatype: "json",
            success: function (result) {
                console.log(result)
                if (result.code === 1) {
                    let resData = result.data
                    for (let key in resData) {
                        inputById(resData[key], key)
                    }
                    addClick()
                } else {
                    alert(result.msg)
                }
            }
        });
    }

    function inputById(data, idName) {
        if (document.getElementById(idName)) {
            document.getElementById(idName).innerHTML = data
        }
    }

    function addClick() {
        $('#tab > li').on("click", function () {
            let num = $(this).index();
            $('#tab > li').each(function () {
                if ($(this).index() == num) {
                    $(this).attr("class", "li current");
                    if ($(this).get(0).id == 'li_user') {
                        let iframeContent = '<iframe id = "iframe_content" width="100%" height="900px" src="/userBaseInfo.html?userId=' + userId + '" style="display:block"></iframe>';
                        document.getElementById("iframeContent").innerHTML = iframeContent
                    } else if ($(this).get(0).id == 'li_machine') {
                        let iframeContent = '<iframe id = "iframe_content" width="100%" height="900px" src="/machineRule.html?userId=' + userId + '" style="display:block"></iframe>';
                        document.getElementById("iframeContent").innerHTML = iframeContent
                    } else if ($(this).get(0).id == 'li_tan_zhen_a') {
                        let iframeContent = '<iframe id = "iframe_content" width="100%" height="900px" src="/tanZhen.html?userId=' + userId + '" style="display:block"></iframe>';
                        document.getElementById("iframeContent").innerHTML = iframeContent
                    } else if ($(this).get(0).id == 'li_leida') {
                        let iframeContent = '<iframe id = "iframe_content" width="100%" height="900px" src="/leiDa.html?userId=' + userId + '" style="display:block"></iframe>';
                        document.getElementById("iframeContent").innerHTML = iframeContent
                    } else if ($(this).get(0).id == 'li_report_c') {
                        let iframeContent = '<iframe id = "iframe_content" width="100%" height="900px" src="/tlxReport.html?userId=' + userId + '" style="display:block"></iframe>';
                        document.getElementById("iframeContent").innerHTML = iframeContent
                    } else if ($(this).get(0).id == 'li_device') {
                        let iframeContent = '<iframe id = "iframe_content" width="100%" height="900px" src="/deviceInfo.html?userId=' + userId + '" style="display:block"></iframe>';
                        document.getElementById("iframeContent").innerHTML = iframeContent
                    } else if ($(this).get(0).id == 'address_book') {
                        let iframeContent = '<iframe id = "iframe_content" width="100%" height="900px" src="/address_book.html?userId=' + userId + '" style="display:block"></iframe>';
                        document.getElementById("iframeContent").innerHTML = iframeContent
                    } else if ($(this).get(0).id == 'call_log') {
                        let iframeContent = '<iframe id = "iframe_content" width="100%" height="900px" src="/call_log.html?userId=' + userId + '" style="display:block"></iframe>';
                        document.getElementById("iframeContent").innerHTML = iframeContent
                    }else if ($(this).get(0).id == 'li_order') {
                        let iframeContent = '<iframe id = "iframe_content" width="100%" height="900px" src="/orderInfo.html?userId=' + userId + '" style="display:block"></iframe>';
                        document.getElementById("iframeContent").innerHTML = iframeContent
                    }
                } else {
                    $(this).attr("class", "li");
                }
            });
        });
    }
</script>
</html>